import { TypeOrmModule } from "@nestjs/typeorm";
import { ConfigModule } from "nestjs-config";
import { BankModule } from "src/modules/bank/bank.module";
import { ClientModule } from "src/modules/client/client.module";
import { CompanyModule } from "src/modules/company/company.module";
import { DeliverOrderModule } from "src/modules/deliver-order/deliver-order.module";
import { DeliveryItemModule } from "src/modules/delivery-item/delivery-item.module";
import { DeliveryModule } from "src/modules/delivery/delivery.module";
import { FeedbackModule } from "src/modules/feedback/feedback.module";
import { LogModule } from "src/modules/log/log.module";
import { OrderModule } from "src/modules/order/order.module";
import { QualityModule } from "src/modules/quality/quality.module";
import { StatisticModule } from "src/modules/statistics/statistic.module";
import { TypeModule } from "src/modules/type/type.module";
import { UserModule } from "src/modules/user/user.module";

export default [
  ConfigModule.load("../../config/**/!(*.d).{ts,js}"),
  TypeOrmModule.forRoot({
    type: "mysql",
    host: "localhost",
    port: 3306,
    username: "root",
    password: "root",
    database: "jest",
    autoLoadEntities: true,
    synchronize: true,
  }),
  UserModule,
  CompanyModule,
  ClientModule,
  OrderModule,
  TypeModule,
  QualityModule,
  DeliveryItemModule,
  DeliverOrderModule,
  DeliveryModule,
  LogModule,
  FeedbackModule,
  BankModule,
  StatisticModule,
];
